import 'package:flutter/material.dart';

//因为Dart不支持多继承，所以如果model继承了其他类，所以就可以用混入模式

class XJCounterViewModel with ChangeNotifier {
  int _counter = 10;
  String _name;

  int get counter => _counter;

  set counter(int value) {
    _counter = value;
    notifyListeners();
  }

  String get name => _name;

  set name(String value) {
    _name = value;
    notifyListeners();
  }
}
